<?php defined('_JEXEC') or die('Restricted access'); ?>

<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col100">
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Details' ); ?></legend>

		<table class="admintable">
		<tr>
			<td width="100" align="right" class="key">
				<label for="charge">
					<?php echo JText::_( 'Charge' ); ?>:
				</label>
			</td>
			<td>
				<input class="text" type="text" name="charge" id="charge" size="32" maxlength="250" value="<?php echo $this->charge->charge;?>" />
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="ordering">
					<?php echo JText::_( 'Ordering' ); ?>:
				</label>
			</td>
			<td>
			<select id='ordering' name='ordering' class='inputbox' size='1'>
			<option value="0">0 <?php echo JText::_( 'First' ); ?></option>
			<?php if($this->charges) : ?>
			<?php foreach($this->charges as $charge): ?>
				<option value="<?php echo $charge->ordering ?>" <?php if(isset($this->charge->ordering) && $charge->ordering == $this->charge->ordering) echo " selected='selected' "; ?>><?php echo $charge->ordering . " " . $charge->charge ?></option>
			<?php endforeach; ?>
			
			<option value='<?php echo (count($this->charges) + 1) ?>'><?php echo (count($this->charges) + 1) . " " . JText::_( 'Last' ); ?></option>
			<?php endif; ?>
			</select>
			</td>
		</tr>
	
		
	</table>
	</fieldset>
</div>
<div class="clr"></div>

<input type="hidden" name="option" value="com_congregation" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="id" value="<?php echo $this->charge->id ?>" />
<input type="hidden" name="controller" value="charge" />
</form>
